Skip to main content
POST
/
api
/
call
/
stop-calling
curl --location '{{baseUrl}}/api/call/stop-calling' \
  --header 'Authorization: Bearer {{authToken}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "batchId": "64e5f12345abcdef98765432",
    "userId": "64e5f12345abcdef12345678"
  }'
{
  "message": "",
  "status": true,
  "code": 200,
  "errorMessage": "",
  "data": {
    "batchId": "64e5f12345abcdef98765432",
    "status": "stopped"
  }
}

Overview

Call this endpoint when you want to pause or end a campaign early. The batch status switches to stopped, preventing the dialer from launching additional calls. Existing conversations continue until they complete or hit agent-configured thresholds.

Prerequisites

  • You know the batchId you want to stop.
  • The authenticated user owns or administrates the batch.

Request

Authorization
string
required
Bearer token for an authorised workspace admin.
batchId
string
required
Batch identifier to halt.
userId
string
required
Workspace user responsible for the batch. Used for auditing and scoping.
curl --location '{{baseUrl}}/api/call/stop-calling' \
  --header 'Authorization: Bearer {{authToken}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "batchId": "64e5f12345abcdef98765432",
    "userId": "64e5f12345abcdef12345678"
  }'

Response

{
  "message": "",
  "status": true,
  "code": 200,
  "errorMessage": "",
  "data": {
    "batchId": "64e5f12345abcdef98765432",
    "status": "stopped"
  }
}
status
boolean
required
Indicates whether the batch was successfully stopped.
code
integer
required
HTTP status code (200 for success).
data
object
Additional information about the stopped batch.

Error Handling

  • 400 Bad Request – Missing required parameters (batchId or userId).
  • 401 Unauthorized – Bearer token missing or expired.
  • 404 Not Found – Batch not found or user not found.
  • 500 Internal Server Error – Failed to stop calling service or call queue; retry or contact support.
Stopping Behavior:
  • Prevents new calls from being initiated for the batch
  • In-flight calls are allowed to complete naturally
  • The call queue is stopped to prevent new call processing
  • Batch status is updated to reflect the stopped state
After stopping, verify the batch status using GET /api/call/batches/{userId} to confirm it shows as stopped.

Authorizations

Authorization
string
header
required

Bearer token authentication for workspace access

Body

application/json
batchId
string
required
Example:

"64e5f12345abcdef98765432"

userId
string
required
Example:

"64e5f12345abcdef12345678"

Response

Calling service stopped